package com.foreknow.demo11;

import java.util.Scanner;

public class UserManager {

    public int m1(Integer a) { //Integer a = 12; 将整型封装为包装类型
        return 12 + a; //a.intValue() 相当于将Integer类型自动拆封为int类型，然后再运算
    }

    public static void main(String[] args) {

        Integer i1 = new Integer(10);
        Integer i2 = new Integer(10);
        System.out.println(i1==i2);//false
        System.out.println(i1.equals(i2));

//        UserManager manager = new UserManager();
//        int num = manager.m1(12);
//        System.out.println(num);

//        Scanner input = new Scanner(System.in);
//        System.out.println("请输入第一个数: ");
//        String num1 = input.next();
//        System.out.println("请输入第二个数: ");
//        String num2 = input.next();
//        //需要将num1和num2转换为整型
//        int a = Integer.parseInt(num1);
//        int b = Integer.parseInt(num2);
//        System.out.println(a + b);
//        double money = Double.parseDouble("3.14");
//        System.out.println(money);

    }
}
